﻿using Himp.Outpatient.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;

namespace Himp.Outpatient
{
    public class OtpSchdPlanRepository : EfCoreRepository<OutpatientDbContext, OtpSchdPlan, Guid>, IOtpSchdPlanRepository
    {
        public OtpSchdPlanRepository(
            IDbContextProvider<OutpatientDbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }

        /// <summary>
        /// 获取门诊排班计划列表
        /// </summary>
        /// <returns></returns>
        public async Task<IQueryable<OtpSchdPlan>> GetListAsync()
        {
            var dbSet = await GetDbSetAsync();
            var result = dbSet.Include(d => d.OtpSchdType);

            return result;
        }
    }
}
